<#import "/spring.ftl" as s/>
<@override name="styles">
<link rel="stylesheet" type="text/css" href="<@s.url '/resources/common/css/jquery.autocomplete.css'/>"/>
</@override>
<@override name="main">
<div id='QuestionForm'>
      <form id='form_question' action="<@s.url '/issue/save'/>" method="post" enctype="multipart/form-data">
            <table art="form" columns="90,*" autoLabel="true" rightAlign="true" colon="true" width="800px">
                  <input type="hidden"  id="p_id" name="pid" >

                  <tr>
                        <td>
                              <label art='label' required="true"><@s.message "issue.project.visitor.project"/></label>
                        </td>
                        <td>
                            <input id="new_issue_p_select" name="newIssue_p_select" art="combobox" required="true" requiredMsg="<@s.message "issue.new.login.project.error.tip"/>" display='right'/>
                        </td>
				  </tr>
                  <tr>
                        <td>
                            <label art='label' for="txt_title" required="true"><@s.message "issue.project.visitor.title"/></label>
						</td>
                        <td>
                            <input tabindex='1' id='txt_title' type="text" art="textbox"    required="true"    requiredMsg="<@s.message "issue.new.title.required.error.tip"/>"
                                    validType="length[5,255]"  display='right'  errorMsg="<@s.message "issue.new.login.title.error.tip"/>"
                                   emptyText="<@s.message 'issue.project.visitor.tip.title'/>"  name='summary'/>
                        </td>
                  </tr>
                  <tr>
                        <td>
                              <label art='label' required="true"><@s.message "issue.project.visitor.type"/></label>
                        </td>
                        <td id="radio_select">
							<#list types as type>
								<#if type_index==0>
                                    <input type="radio" name="issuetype" id="issue_type_${type.id}" value="${type.id}" title="${type.description}"
                                           checked="true" tabindex="2">
                                    <label for="issue_type_${type.id}">${type.pname}</label>
								<#else>
                                    <input type="radio" id="issue_type_${type.id}" name="issuetype" value="${type.id}" title="${type.description}"
                                           tabindex="2">
                                    <label for="issue_type_${type.id}">${type.pname}</label>
								</#if>
							</#list>
                        </td>
				  </tr>
                  <tr>
                        <td></td>
                        <td>
                              <strong><@s.message 'issue.project.visitor.desciption'/><@s.message 'colon'/></strong><@s.message 'issue.project.visitor.tip.description'/>
                              <textarea tabindex='2' name="description" id="ta_qa_content"
                                        style="height:260px;"></textarea>
                        </td>
                  </tr>
                <tr>
                    <td>
                          <label required="true"><@s.message "issue.project.visitor.reporter"/></label>
                    </td>
                    <td>
                          <input type="text" art="textbox" value="${account.name}" disabled/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label required="true"><@s.message "issue.project.visitor.mail"/></label>
                    </td>
                    <td>
                        <input type="text" art="textbox" value="${account.mail}" disabled/>&nbsp;&nbsp;<input type="checkbox" id="login_reporter_notify" name="mail_notify" />&nbsp;<label for="login_reporter_notify"><@s.message 'issue.project.visitor.mail.notify'/></label>
                    </td>
                </tr>
                  <tr>
                        <td id="add_br">
                              <label art='label'><@s.message "issue.project.visitor.attachement"/></label>
                        </td>
                        <td id="file">
                        </td>

                 </tr>

                <tr>
                    <td>
                          <input type="hidden" id="store"/>
                    </td>
                    <td>
                        <div> <a id="add_attach" name="add_" style="cursor: pointer"  onclick="issue_add.add_more()"><@s.message "issue.project.visitor.attachement.more"/></a>&nbsp;<span><@s.message 'issue.project.visitor.attachment.size'/></span></div>

                    </td>

                </tr>

                  <tr id='tr_form_msg'>
                        <td colspan="2"></td>
                  </tr>
                  <tr>
                        <td></td>
                        <td>
                            <input tabindex='3' id='tx_reporter' type="hidden" name='reporter'/>
                             <button id="btn_submit_stay" type="button" onclick="check_stay.form_submit(1)" >
							               <span><span><@s.message 'issue.project.visitor.button1'/> &raquo;</span></span>
                             </button>
                            <button id="btn_submit" type="button" onclick="check_stay.form_submit(2)">
							              <span><span><@s.message 'issue.project.visitor.button2'/> &raquo;</span></span>
                            </button>
                        </td>
                  </tr>
            </table>
      </form>
</div>
<div id='QuestionTip'>
      <div id='QuestionTitleTip'>
            <h2><@s.message 'issue.project.visitor.read'/></h2>
            <ol>
                  <#list 1..4 as i>
                        <li><@s.message 'issue.project.visitor.read.${i}'/></li>
                  </#list>
            </ol>
      </div>
</div>

</@override>
<@override name="scripts">

<script type="text/javascript" src="<@s.url '/resources/common/plugins/jquery.autocomplete.pack.js'/>"></script>
<script type="text/javascript" src="<@s.url '/resources/common/ke/kindeditor-min.js'/>" charset="utf-8"></script>
<script type='text/javascript'>
      <!--
      var js_param = {
            upload_url      :'<@s.url '/action/upload'/>',
            project_load_url     :'<@s.url "/issue/load"/>'
      };
      //-->
</script>
<script type="text/javascript" src="<@s.url '/resources/scripts/issue/add.js'/>"></script>

</@override>
<@extends name="/common/layout.ftl" current="new_issue" title='issue.operation.add'></@extends>